home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / qbasicpg.zip / HUNT.BAS < prev    next >
BASIC Source File  |  1989-08-31  |  339b  |  16 lines

  1. ' HUNT.BAS
  2. ' This program demonstrates the INSTR function.
  3.  
  4. CLS
  5.  
  6. search$ = "iddle"
  7. base$ = "High, diddle, diddle, the cat and the fiddle"
  8. strLocation% = INSTR(1, base$, search$)
  9.  
  10. IF (strLocation% <> 0) THEN
  11.     PRINT search$; " first appears starting at character"; strLocation%
  12. ELSE
  13.     PRINT search$; " not found"
  14. END IF
  15.  
  16.